home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / utimets.z / utimets
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. UUUUTTTTIIIIMMMMEEEETTTTSSSS((((2222))))                                                          UUUUTTTTIIIIMMMMEEEETTTTSSSS((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      utimets - set file access and modification times
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttiiiimmmmeeee....hhhh>>>>
  13.  
  14.      uuuuttttiiiimmmmeeeettttssss((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffiiiilllleeee,,,, ccccoooonnnnsssstttt ssssttttrrrruuuucccctttt ttttiiiimmmmeeeessssppppeeeecccc ttttiiiimmmmeeeettttssss[[[[2222]]]]))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _u_t_i_m_e_t_s call uses the "accessed" and "updated" times in that order
  18.      from the _t_i_m_e_t_s vector to set the corresponding recorded times for _f_i_l_e.
  19.  
  20.      The caller must be the owner of the file or have write permission to use
  21.      _u_t_i_m_e_t_s in this manner.
  22.  
  23.      This routine is not part of any standard and is specific to IRIX 6.5.10
  24.      and later.  Applications that call utimets may be run under earlier
  25.      versions of IRIX if they test for the existence of the interface and fall
  26.      back to using one of the older file time setting interfaces:
  27.  
  28.             #include <optional_sym.h>
  29.  
  30.             if (_MIPS_SYMBOL_PRESENT(utimets)) {
  31.                   utimets(file, ts);
  32.             } else {
  33.                   struct utimbuf tb;
  34.                   tb.actime = ts[0].tv_sec;
  35.                   tb.modtime = ts[1].tv_sec;
  36.                   utime(file, &tb);
  37.             }
  38.  
  39.  
  40. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  41.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  42.      of -1 is returned and _e_r_r_n_o is set to indicate the error.  _u_t_i_m_e_t_s will
  43.      fail if one or more of the following are true:
  44.  
  45.      [ENOTDIR]      A component of the path prefix is not a directory.
  46.  
  47.      [EINVAL]       The pathname contains a character with the high-order bit
  48.                     set.
  49.  
  50.      [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an
  51.                     entire path name exceeded 1023 characters.
  52.  
  53.      [ENOENT]       The named file does not exist.
  54.  
  55.      [ELOOP]        Too many symbolic links were encountered in translating
  56.                     the pathname.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. UUUUTTTTIIIIMMMMEEEETTTTSSSS((((2222))))                                                          UUUUTTTTIIIIMMMMEEEETTTTSSSS((((2222))))
  71.  
  72.  
  73.  
  74.      [EPERM]        The process is not super-user and not the owner of the
  75.                     file.
  76.  
  77.      [EACCES]       Search permission is denied for a component of the path
  78.                     prefix.
  79.  
  80.      [EROFS]        The file system containing the file is mounted read-only.
  81.  
  82.      [EFAULT]       _F_i_l_e or _t_i_m_e_t_s points outside the process's allocated
  83.                     address space.
  84.  
  85.      [EIO]          An I/O error occurred while reading or writing the
  86.                     affected inode.
  87.  
  88. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.      stat(2), utime(2)
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.